package com.huoyun.invoice.service;

import com.huoyun.invoice.bean.Invoice;
import com.huoyun.invoice.dao.InvoiceDao;

public class InvoiceServiceImpl implements InvoiceService{
	private InvoiceDao invoiceDao;

	@Override
	public void saveInvoice(Invoice invoice) {
		invoiceDao.saveInvoice(invoice);
	}

	@Override
	public void updateInvoice(Invoice invoice) {
		invoiceDao.updateInvoice(invoice);
	}
	
	/**
	 * 根据发票id查询发票
	 * @param invoiceId
	 * @return
	 */
	public Invoice getInvoiceById(long invoiceId)
	{
		return invoiceDao.getInvoiceById(invoiceId);
	}
	
	/**
	 * 删除发票信息
	 * @param invoiceId
	 */
	public void delInvoice(long invoiceId)
	{
		invoiceDao.delInvoice(invoiceId);
	}
	
	public InvoiceDao getInvoiceDao() {
		return invoiceDao;
	}

	public void setInvoiceDao(InvoiceDao invoiceDao) {
		this.invoiceDao = invoiceDao;
	}
}
